package xyz.jcat.mongo;

import lombok.Getter;
import lombok.Setter;
import xyz.jcat.common.util.JsonUtils;

import java.util.Date;
import java.util.Objects;

@Getter
@Setter
public class BaseDocument {

    private Date createTime;
    private Date updateTime;

    public static final String field_createTime = "createTime";
    public static final String field_updateTime = "updateTime";

    @Override
    public String toString() {
        if(Objects.isNull(this)) {
            return null;
        }
        return JsonUtils.toString(this);
    }
}
